package com.edu.service.impl;
/*
 * @Author:princess
 * @Date 2023/10/30 10 30 19:10
 *
 */

import com.edu.service.UserService;

import java.util.Date;

public class UserServiceProxy implements UserService {
    private UserService userService;
    public UserServiceProxy(UserService userService){
        this.userService = userService;
    }

    @Override
    public void addUser() {
        long start = System.currentTimeMillis();
        userService.addUser();
        long end = System.currentTimeMillis();
        System.out.println("方法开始执行时间"+(end-start));
    }

    @Override
    public void deleteUser() {
        long start = System.currentTimeMillis();
        userService.deleteUser();
        long end = System.currentTimeMillis();
        System.out.println("方法开始执行时间"+(end-start));
    }

    @Override
    public void updateUser() {
        long start = System.currentTimeMillis();
        userService.updateUser();
        long end = System.currentTimeMillis();
        System.out.println("方法开始执行时间"+(end-start));
    }

    @Override
    public void selectUser() {
        long start = System.currentTimeMillis();
        userService.selectUser();
        long end = System.currentTimeMillis();
        System.out.println("方法开始执行时间"+(end-start));
    }
}
